/**
 * Copyright 2019 bejson.com
 */
package com.xingkeduo.dto.transter.order;


import com.xingkeduo.utils.PageResponseDTO;
import com.xingkeduo.utils.ResponseUtils;
import lombok.Data;

@Data
public class OrderResponseDto {

    private int error;
    private Object reason;
    private ContentOrder content;

    public void covert(ResponseUtils<PageResponseDTO<OrderUserResponseDto>> responseUtils, ContentOrder contentOrder) {
        this.error = responseUtils.getStatus() == 1 ? 0 : 1;
        this.reason = responseUtils.getStatus() == 1 ? 0 : 1;
        this.content = contentOrder;
    }

    public void errorUserAuth(String reason) {
        this.error = 9004;
        this.reason = reason;
    }
}